{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "6.写一个小程序，能够实现打印Python标准库里其中一个库的doc（文档）\n",
    "\n",
    "授人以鱼，不如授人以渔\n",
    "\n",
    "鱼：实现方法\n",
    "渔：分析思路，分析问题，解决问题的能力"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "str(object='') -> str\n",
      "str(bytes_or_buffer[, encoding[, errors]]) -> str\n",
      "\n",
      "Create a new string object from the given object. If encoding or\n",
      "errors is specified, then the object must expose a data buffer\n",
      "that will be decoded using the given encoding and error handler.\n",
      "Otherwise, returns the result of object.__str__() (if defined)\n",
      "or repr(object).\n",
      "encoding defaults to sys.getdefaultencoding().\n",
      "errors defaults to 'strict'.\n"
     ]
    }
   ],
   "source": [
    "print(str.__doc__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n",
      "\n",
      "Prints the values to a stream, or to sys.stdout by default.\n",
      "Optional keyword arguments:\n",
      "file:  a file-like object (stream); defaults to the current sys.stdout.\n",
      "sep:   string inserted between values, default a space.\n",
      "end:   string appended after the last value, default a newline.\n",
      "flush: whether to forcibly flush the stream.\n"
     ]
    }
   ],
   "source": [
    "print(print.__doc__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int(x=0) -> integer\n",
      "int(x, base=10) -> integer\n",
      "\n",
      "Convert a number or string to an integer, or return 0 if no arguments\n",
      "are given.  If x is a number, return x.__int__().  For floating point\n",
      "numbers, this truncates towards zero.\n",
      "\n",
      "If x is not a number or if base is given, then x must be a string,\n",
      "bytes, or bytearray instance representing an integer literal in the\n",
      "given base.  The literal can be preceded by '+' or '-' and be surrounded\n",
      "by whitespace.  The base defaults to 10.  Valid bases are 0 and 2-36.\n",
      "Base 0 means to interpret the base from the string as an integer literal.\n",
      ">>> int('0b100', base=0)\n",
      "4\n"
     ]
    }
   ],
   "source": [
    "print(int.__doc__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Return the absolute value of the argument.\n"
     ]
    }
   ],
   "source": [
    "print(abs.__doc__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
